//
//package com.rt.schedulenew.core.config;
//
//import org.springframework.boot.context.properties.ConfigurationProperties;
//import org.springframework.context.annotation.Bean;
//import com.alibaba.druid.pool.DruidDataSource;
//
//import javax.sql.DataSource;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//
//import java.util.Objects;
//
//@Configuration
//public class DateSourceConfig {
////    @Autowired
////    private SqlServerDruidConfig druidConfig;
//
//    @Bean(name = {"dataSource"})
//    @ConfigurationProperties(prefix = "spring.datasource.druid")
//    public DataSource getOrderDataSource() {
//        DruidDataSource dataSource = new DruidDataSource();
//        // dataSource.setMinEvictableIdleTimeMillis(Objects.isNull(druidConfig.getMinEvictableIdleTimeMillis())?0l:druidConfig.getMinEvictableIdleTimeMillis());
//        // dataSource.setMaxEvictableIdleTimeMillis(Objects.isNull(druidConfig.getMaxEvictableIdleTimeMillis())?0l:druidConfig.getMaxEvictableIdleTimeMillis());
////        dataSource.setMaxEvictableIdleTimeMillis(druidConfig.getMaxEvictableIdleTimeMillis());
//        return dataSource;
//    }
////    @Bean
////    public SqlServerDruidConfig getDruidConfig() {
////        return new SqlServerDruidConfig();
////    }
////    @ConfigurationProperties(prefix = "spring.datasource.druid")
////    public class SqlServerDruidConfig
////    {
////        private Long minEvictableIdleTimeMillis;
////        private Long maxEvictableIdleTimeMillis;
////        public SqlServerDruidConfig() {
////        }
////        public Long getMinEvictableIdleTimeMillis() {
////            return this.minEvictableIdleTimeMillis;
////        }
////        public Long getMaxEvictableIdleTimeMillis() {
////            return this.maxEvictableIdleTimeMillis;
////        }
////        public void setMinEvictableIdleTimeMillis(final Long minEvictableIdleTimeMillis) {
////            this.minEvictableIdleTimeMillis = minEvictableIdleTimeMillis;
////        }
////        public void setMaxEvictableIdleTimeMillis(final Long maxEvictableIdleTimeMillis) {
////            this.maxEvictableIdleTimeMillis = maxEvictableIdleTimeMillis;
////        }
////    }
//}
